package com.ruoyi.system.service.impl;

import java.util.Date;
import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BasicMessageMapper;
import com.ruoyi.system.domain.BasicMessage;
import com.ruoyi.system.service.IBasicMessageService;

/**
 * 消息信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class BasicMessageServiceImpl implements IBasicMessageService 
{
    @Autowired
    private BasicMessageMapper basicMessageMapper;

    /**
     * 查询消息信息
     * 
     * @param messageId 消息信息主键
     * @return 消息信息
     */
    @Override
    public BasicMessage selectBasicMessageByMessageId(Long messageId)
    {
        return basicMessageMapper.selectBasicMessageByMessageId(messageId);
    }

    /**
     * 查询消息信息列表
     * 
     * @param basicMessage 消息信息
     * @return 消息信息
     */
    @Override
    public List<BasicMessage> selectBasicMessageList(BasicMessage basicMessage)
    {
        return basicMessageMapper.selectBasicMessageList(basicMessage);
    }

    /**
     * 新增消息信息
     * 
     * @param basicMessage 消息信息
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertBasicMessage(BasicMessage basicMessage)
    {
        return basicMessageMapper.insertBasicMessage(basicMessage);
    }

    /**
     * 修改消息信息
     * 
     * @param basicMessage 消息信息
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateBasicMessage(BasicMessage basicMessage)
    {
        return basicMessageMapper.updateBasicMessage(basicMessage);
    }

    /**
     * 批量删除消息信息
     * 
     * @param messageIds 需要删除的消息信息主键
     * @return 结果
     */
    @Override
    public int deleteBasicMessageByMessageIds(Long[] messageIds)
    {
        return basicMessageMapper.deleteBasicMessageByMessageIds(messageIds);
    }

    /**
     * 删除消息信息信息
     * 
     * @param messageId 消息信息主键
     * @return 结果
     */
    @Override
    public int deleteBasicMessageByMessageId(Long messageId)
    {
        return basicMessageMapper.deleteBasicMessageByMessageId(messageId);
    }
}
